import { defineStore } from 'pinia'
import { createWoker, getWokers, updateWoker, deleteWoker } from '@/service/wokers/wokers'

const useWokersStore = defineStore('wokers', {
  state: () => {
  },
  actions: {
    async createWoker(woker) {
      const res = await createWoker(woker)
      return res
    },
    async getWokers() {
      const res = await getWokers()
      return res
    },
    async updateWoker(woker) {
      const res = await updateWoker(woker)
      return res
    },
    async deleteWoker(id) {
      const res = await deleteWoker(id)
      return res
    }
  }
})


export default useWokersStore